package com.feng.server.config;

import com.feng.server.util.PropertiesUtils;

public class ServerConfig {
    private static int port;
    private static String webSocketPath;

    static {
        initConfig();
    }

    public static int getPort() {
        return port;
    }

    public static String getWebSocketPath() {
        return webSocketPath;
    }

    private static void initConfig() {
        String portStr = PropertiesUtils.getProperty("chat.sever.port", "8888");
        port = Integer.parseInt(portStr);
        webSocketPath= PropertiesUtils.getProperty("chat.sever.webSocketPath", "/chat");
    }
}
